<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/amazeui.min.css"/>
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/hy.admin.css"/>
	</head>
	<body>
		<div class="am-g">
	{include file='../Common/hy_header.html'}
		<form id="formsearch" >
			<div class="am-u-md-12 am-cf">
				<div class="am-u-md-12" style="padding:10px;">
		          <div class="am-input-group am-input-group-sm">
		          		<span class="am-input-group-label" style="background-color: #fff;border: 0px;">时间</span>
		          		<input value="{$total.startTime|date_format:'Y-m-d H:i:s'}"  style="width:200px;" type="text" id="startTime" name="startTime" class="field am-form-field hy-js-search">
		          		<span class="am-input-group-label" style="background-color: #fff;border: 0px;">至&nbsp;&nbsp;&nbsp;</span>
		          		<input value="{$total.endTime|date_format:'Y-m-d H:i:s'}"  style="width:200px;" type="text" id="endTime" name="endTime" class="field am-form-field hy-js-search">
		          		<span class="am-input-group-label" style="background-color: #fff;border: 0px;">记者名</span>
		          		<input value="{$total.reporter_name}"  style="width:200px;" type="text" id="reporter_name" name="reporter_name" class="field am-form-field hy-js-search">
		          		<input value="{$page}" type="hidden"  name="page" class="field ">
		          </div>
		        </div>
		        <div class="am-u-md-12" style="padding:10px">
		        	<div class="am-input-group am-input-group-sm">
				   		<span class="am-input-group-btn" style=" height: 45px;">
			                  <button class="am-btn am-btn-default bin-select-searchbtn" type="button" style="margin-left:10px;">搜索</button>
			                  <a  href="javascript:void(0);" onclick="refreshNow()" id="refresh_html" style="margin-left:10px;" class="am-btn am-btn-default hy-js-href">刷新</a>
			            	<button onClick="detail();" type="button" class="am-btn am-btn-default " style="margin-left:10px;"> uvpv导出</button>
		                </span>
	                </div>
		        </div>
			</div>
		</form>
      <div class="am-g">
      <div class="am-u-sm-12">
        <div class="am-form">
          <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
              <tr>
				<th width="20%" class="table-type">记者</th>
				<th width="23%" class="table-type">新闻资料</th>
				<th width="15%" class="table-author">总uvpv</th>
				<th width="15%" class="table-author">操作</th>
              </tr>
          </thead>
          <tbody>
          	   <!--{foreach key=key from=$list item=sql}-->
            <tr>
              <td >记者名：{$sql.reporter_name}<br/>标题：{$sql.title}</td>
              <td >点赞数：{$sql.like_num|default:0}<br/>评论：{$sql.comment_num|default:0}</td>
              <td >总UV：{$sql.uvpv.uv|default:0}<br/>总PV：{$sql.uvpv.pv|default:0}</td>
              <td>
                <div class="am-btn-toolbar">
                  <div class="am-btn-group am-btn-group-xs">
                  	<button data-id="getuvpv_{$sql.id}" data-title="uvpv-{$sql.title}" data-href="index.php?g=admin&m=reporter&a=getUVPV&id={$sql.id}" class="am-btn am-btn-default am-btn-xs am-text-secondary hy-js-href"><span class="am-icon-pencil-square-o"></span>  前30天详细</button>
                  	<button onClick = "window.location.href = 'index.php?g=admin&m=reporter&a=exportUVPV&id={$sql.id}&name={$sql.reporter_name}&title={$sql.title}'" class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 导出</button>
                  </div>
                 </div>
               </td>
            </tr>
                  <!--{/foreach}-->  
          </tbody>
        </table>
		 <div class="am-cf">
          <div class="am-fr">

  	<div class="hy_page">
  {$list_page}
  </div>
</div>
</div>
          <hr />
      
        </div>
      </div>

    </div>
    </div>
   {include file='../Common/hy_footer.html'}
   <script type="text/javascript" src="{$_C.hy_path}js/laydate/laydate.js"></script>
   <script type="text/javascript" src="{$_C.hy_path}js/Map.js"></script>
   <script type="text/javascript" src="{$_C.hy_path}js/bin.select.js"></script>
   <script type="text/javascript">
   	$(function(){
		laydate({
			   elem: '#startTime',
			   istime:true,
			   format: 'YYYY-MM-DD hh:mm:ss',
			});
		laydate({
			   elem: '#endTime',
			   istime:true,
			   format: 'YYYY-MM-DD hh:mm:ss',
			})
	})
	$('.bin-select-searchbtn').click(function(){
		var url = window.location.href;
           url = url.substring(0,url.indexOf("?"));
		   url+="?g=admin&m=reporter&a=uvpvList";
		var json = uriJson(bulidFilterParams($("#formsearch")));
		if(json!=""&&json!=null&&json!=undefined){
			window.location.href=url+"&"+json;
		}
	});
	
	function loadPage(where){
		var url = window.location.href;
           url = url.substring(0,url.indexOf("?"));
		   url+="?g=admin&m=reporter&a=uvpvList";
		var json = uriJson(bulidFilterParams($("#formsearch")));
		if(json!=""&&json!=null&&json!=undefined){
			window.location.href=url+"&"+json+where;
		}else{
			window.location.href=url+where;
		}
	}
	
	function refreshNow()
	{
		parent.$('#reportUVPV').attr('src', parent.$('#reportUVPV').attr('src'));
	}
	function detail(){
		var html = "index.php?g=admin&m=reporter&a=detail";
		window.open (html,'newwindow','height=500,width=400,top=120,left=300,depended=yes,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');
	}
   </script>
	</body>
</html>
